function debounce(fun,delay){
    return function(args){
        clearTimeout(fun.id)
        fun.id = setTimeout(()=>{
            fun.call(this,...args)
        },delay)
    }
}